<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        div {
            width: 200px;
            height: 200px;
            background-color: red;
        }
    </style>
</head>

<body>
    <div draggable="true" id="dv">
        <p>我想复制这段文字咋办呀！！！难受～～</p>            
    </div>
    <div style="margin-top:30px"></div>

    <script>

        //  监听拖拉事件 
        dv.addEventListener('dragstart', function (e) {
            this.style.backgroundColor = 'blue'
            // alert('ok')
            
        }, false)

        dv.addEventListener('dragend',function(e){
            this.style.backgroundColor = 'red'
            setTimeout(function(){
                location.href = 'http://www.baidu.com'
            },200)
        },false)

    
    </script>
</body>

</html>